package com.youlai.boot.modules.game.model.form;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import java.math.BigDecimal;

/**
 * 游戏用户记录表单
 *
 * @author 有来技术团队
 */
@Schema(description = "游戏用户记录表单")
@Data
public class GameUserRecordForm {

    @Schema(description = "用户ID")
    private Long userId;
    
    @Schema(description = "游戏ID")
    private Long gameId;

    @Schema(description = "游戏时长增量(秒)")
    @Min(value = 0, message = "游戏时长不能为负数")
    private Integer playTimeIncrement;

    @Schema(description = "游戏进度(0-100)")
    @Min(value = 0, message = "游戏进度不能小于0")
    @Max(value = 100, message = "游戏进度不能大于100")
    private Integer progress;

    @Schema(description = "是否收藏")
    private Boolean favorite;

    @Schema(description = "用户评分(1-5分)")
    @DecimalMin(value = "1.0", message = "评分不能小于1")
    @DecimalMax(value = "5.0", message = "评分不能大于5")
    private BigDecimal rating;
} 